import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

createApp(App).use(store).use(ElementPlus).use(router).mount('#app')
router.beforeEach((to,from,next)=>{
	let isLogin = sessionStorage.getItem("isLogin");
	
	
	
	if(to.path!=='/login'&&(isLogin==null||isLogin!='ok')) 
	{
		next({ path: '/login' })
	}
	else next()

})